package com.neo.pub.service.impl;

import com.neo.common.annotation.DataScope;
import com.neo.common.annotation.DataSource;
import com.neo.common.constant.UserConstants;
import com.neo.common.core.text.Convert;
import com.neo.common.enums.DataSourceType;
import com.neo.common.exception.BusinessException;
import com.neo.common.utils.StringUtils;
import com.neo.common.utils.security.Md5Utils;
import com.neo.pub.domain.Patient;
import com.neo.pub.mapper.PatientMapper;
import com.neo.pub.service.IPatientService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 用户 业务层处理
 * 
 * @author ruoyi
 */
@Service
@DataSource(value = DataSourceType.SBH)
public class PatientServiceImpl implements IPatientService
{
    private static final Logger log = LoggerFactory.getLogger(PatientServiceImpl.class);

    @Autowired
    private PatientMapper patientMapper;

    /**
     * 根据条件分页查询用户列表
     * 
     * @param patient 用户信息
     * @return 用户信息集合信息
     */
    @Override
    public List<Patient> selectPatientList(Patient patient)
    {
        return patientMapper.selectPatientList(patient);
    }

    @Override
    public Patient selectPatientById(String patientId) {
        return patientMapper.selectPatientById(patientId);
    }

    @Override
    @Transactional
    public int updatePatient(Patient patient) {
        return patientMapper.updatePatient(patient);
    }

}
